﻿using System;
using System.Collections.Generic;
using System.IO.Pipes;
using System.Runtime.InteropServices;

namespace _17_Console
{
    internal class Program
    {
        #region 枚举
        //enum Sex
        //{
        //    Man,
        //    Women
        //}
        //enum OrderState
        //{
        //    WaitPay = 100,
        //    Pay,
        //    WaitSend = 1,
        //    WaitReceive
        //} 
        #endregion


        static void Main(string[] args)
        {
            // 枚举
            #region 枚举
            //Sex sex = Sex.Man;
            //if(sex == Sex.Man)
            //{
            //    Console.WriteLine(sex);
            //}
            //OrderState state = OrderState.WaitPay;
            //switch (state)
            //{
            //    case OrderState.WaitPay:
            //        break;
            //    case OrderState.Pay:
            //        break;
            //    case OrderState.WaitSend:
            //        break;
            //    case OrderState.WaitReceive:
            //        break;
            //    default:
            //        break;
            //} 
            #endregion


            // 结构体
            Person person = new Person();
            person.Age = 20;
            person.Eat();
            List<int> list = new List<int>() { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
            foreach(var i in list)
            {

            }

            }
        public struct Person
        {
            public Person(int a,string n)
            {
                //string str = null;
                //string str2 = string.Empty;
                //string str3 = "";
                //string str4;

                this.Age = a;
                this.Name = n;

            }
            private int age = 0;
            public int Age
            {
                get { return age = 0; }
                set { age = value; }
            }
            public string Name { get; set; } = string.Empty;
            public void Eat()
            {
                Console.WriteLine("我在吃饭");
            }

        }
    }
}
